<template>
    <div>
        <nav-bar :name="name">
            <template v-slot:left>
                <button>左边的按钮</button>
            </template>

            <template v-slot:center>
                <h2>中间元素</h2>
            </template>

            <template v-slot:right>
                <i>右边</i>
            </template>
           
           
            <template v-slot:[name]>
                <i>右边</i>
            </template>
           
        </nav-bar>
    </div>
</template>

<script>
    import NavBar from './NavBar.vue';

    export default {
        components: {
            NavBar
        },
        data() {
            return {
                name: 'leon'
            }
        }
    }
</script>

<style scoped>

</style>